package com.zzj.hotel.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.zzj.hotel.core.entity.RegistrationInfo;
import com.zzj.hotel.dao.RegistrationInfoDao;
import com.zzj.hotel.service.RegistrationInfoService;

public class RegistrationInfoServiceImpl implements RegistrationInfoService {
	private RegistrationInfoDao registrationInfoDao;
	public RegistrationInfoDao getRegistrationInfoDao() {
		return registrationInfoDao;
	}

	public void setRegistrationInfoDao(RegistrationInfoDao registrationInfoDao) {
		this.registrationInfoDao = registrationInfoDao;
	}

	public RegistrationInfo findById(String id) {
		Map<String,Object> queryMap = new HashMap<String,Object>();
		queryMap.put(RegistrationInfo.REGID, id);
		return registrationInfoDao.selectOne(queryMap);
	}

	public List<RegistrationInfo> findAll() {
		return registrationInfoDao.selectList(null);
	}

	public void update(RegistrationInfo registrationInfo) {
		registrationInfoDao.update(registrationInfo);

	}

	public void insert(RegistrationInfo registrationInfo) {
		registrationInfoDao.insert(registrationInfo);

	}

	public void deleteById(String id) {
		Map<String,Object> queryMap = new HashMap<String,Object>();
		queryMap.put(RegistrationInfo.REGID, id);
		registrationInfoDao.delete(queryMap);
	}

}
